package org.apache.osgimaker.editors.model;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jdt.core.ICompilationUnit;

public class Bundle {
	private String id;
	private String symbolicName;
	private String version;
	private String activator;
	private List<String> classes;
	/*private List<String> importPackages;
	private List<String> privatePackages;
	private List<String> exportPackages;*/
	
	public List<String> usedByList = new ArrayList<String>();
	public List<String> usesInternalList = new ArrayList<String>();
	public List<String> usedExternalList = new ArrayList<String>();
	
	public List<Bundle> sonBundleList = new ArrayList<Bundle>();
	public List<Bundle> fatherBundleList = new ArrayList<Bundle>();
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public List<String> getClasses() {
		return classes;
	}
	public void setClasses(List<String> classes) {
		this.classes = classes;
	}
	public void setICompilationUnitList(String packageName, ICompilationUnit[] classList){
		this.classes = new ArrayList<String>();
		for(int i=0; i<classList.length; i++){
			String fileName = classList[i].getElementName();
			this.classes.add(packageName + "." + fileName.substring(0,fileName.indexOf(".")));
		}
	}
	/*public List<String> getImportPackages() {
		return importPackages;
	}
	public void setImportPackages(List<String> importPackages) {
		this.importPackages = importPackages;
	}
	public List<String> getPrivatePackages() {
		return privatePackages;
	}
	public void setPrivatePackages(List<String> privatePackages) {
		this.privatePackages = privatePackages;
	}
	public List<String> getExportPackages() {
		return exportPackages;
	}
	public void setExportPackages(List<String> exportPackages) {
		this.exportPackages = exportPackages;
	}*/
	public String getSymbolicName() {
		return symbolicName;
	}
	public void setSymbolicName(String symbolicName) {
		this.symbolicName = symbolicName;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public String getActivator() {
		return activator;
	}
	public void setActivator(String activator) {
		this.activator = activator;
	}
	
}
